-- GENERATED SPELL FOR [Drek'Thar] --


function spell0_11946(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_11946', 591, 1)
end

function spell1_11946(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(19128,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11946', 2000, 1)
end

function spell2_11946(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_11946', 567, 1)
end

function spell3_11946(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_11946', 2000, 1)
end

function Sorts_11946(pUnit, Event)
local choix_sorts_11946 = math.random(0, 3)
if choix_sorts_11946 == 0 then
pUnit:RegisterEvent('spell0_11946', 1, 1)
end
if choix_sorts_11946 == 1 then
pUnit:RegisterEvent('spell1_11946', 1, 1)
end
if choix_sorts_11946 == 2 then
pUnit:RegisterEvent('spell2_11946', 1, 1)
end
if choix_sorts_11946 == 3 then
pUnit:RegisterEvent('spell3_11946', 1, 1)
end
end

function mob11946_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11946', math.random(1500, 3000), 1)
end

function mob11946_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11946_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11946_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11946, 1, 'mob11946_Action')
RegisterUnitEvent(11946, 2, 'mob11946_Leave')
RegisterUnitEvent(11946, 3, 'mob11946_Kill')
RegisterUnitEvent(11946, 4, 'mob11946_Die')
